home *** CD-ROM | disk | FTP | other *** search
Makefile | 2004-08-18 | 1.7 KB | 80 lines |
- #############################################################################
- #
- # $RCSfile: Makefile $
- # $Revision: 1.12 $
- # $Date: 2004/08/17 23:06:48 $
- # $Author: ssolie $
- #
- #############################################################################
- #
- # Copyright (c) 2004 Steven Solie. All Rights Reserved.
- #
- #############################################################################
- .PHONY : all clean list count release
-
- CXX := g++
- CXXFLAGS := -Wall -ftemplate-depth-30 -ISDK:boost -DBOOST_DISABLE_ASSERTS
- LD := g++
- LDFLAGS :=
-
- EXENAME := loc
- OBJECTS := Main.o ArgParser.o FileCount.o Tally.o FileTally.o\
- SourceCode.o PatternMatch.o File.o
- LIBS :=
-
-
- ### All targets ###
- all release: $(EXENAME)
- @List $(EXENAME) NOHEAD
- @Echo "Executable is ready. Go ahead and run it. I dare you."
-
-
- ### Adjust flags based on target ###
- ifeq ($(MAKECMDGOALS), release)
- CXXFLAGS += -O3
- endif
-
-
- ### Executable program creation ###
- $(EXENAME): $(OBJECTS)
- @Echo "Linking $@..."
- @$(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
- @strip -R.comment $@
-
-
- ### Pattern Rules ###
- %.o: %.cpp
- @Echo Compiling $<...
- @$(CXX) $(CXXFLAGS) -c $<
-
-
- ### Source file dependencies ###
- Main.o: Main.cpp Main.h ArgParser.h FileCount.h SourceCode.h Tally.h\
- PatternMatch.h
-
- ArgParser.o: ArgParser.cpp ArgParser.h
-
- SourceCode.o: SourceCode.cpp SourceCode.h FileCount.h File.h
-
- Tally.o: Tally.cpp Tally.h FileCount.h FileTally.h
-
- FileTally.o: FileTally.cpp FileTally.h
-
- FileCount.o: FileCount.cpp FileCount.h
-
- PatternMatch.o: PatternMatch.cpp PatternMatch.h
-
- File.o: File.cpp File.h
-
-
- ### Other targets ###
- clean:
- @-Delete >NIL: "#?.(o|obj)" QUIET FORCE
-
- list:
- @List #?.(h|cpp) Makefile NOHEAD SORT=RD
-
- count:
- @loc #?.(h|cpp) TOTAL
- @-loc #?.diff DIFF TOTAL
-